import Vue from 'vue'
import VueRouter from 'vue-router'

import FileUploadDemo from "../views/FileUploadDemo.vue"
import FileManage from "../views/FileManage.vue"
import About from "../views/About.vue"
import ToDoList from "../views/ToDoList.vue"
import Index from "../views/Index.vue"
// import BookUpdate from "../views/BookUpdate.vue"
// import BookManage from "../views/BookManage.vue"
// import AddBook from "../views/AddBook.vue"
// import PageFour from "../views/PageFour.vue"
// import Page5 from "../views/Page5.vue"

Vue.use(VueRouter)

const routes = [
    {
        path: "/",
        name: "临时测试页面",
        component: Index,
        redirect: "/FileUpload",
        show: true,

        children: [
            {
                path: "/FileUpload",
                name: "上传文档",
                component: FileUploadDemo
            },
            {
                path: "/FileManage",
                name: "所有文档",
                component: FileManage
            },
            {
                path: "/About",
                name: "测试说明",
                component: About
            },
            // {
            //     path: "/BookManage",
            //     name: "查询图书",
            //     component: BookManage
            // },
            // {
            //     path: "/AddBook",
            //     name: "添加图书",
            //     component: AddBook
            // },
            {
                path: "/ToDoList",
                name: "编辑待办事项",
                component: ToDoList
            },
        ]
    },
    // {
    //     path: "/maps",
    //     name: "地图测试页面",
    //     component: Index,
    //     redirect: "/LeafletDemo",
    //     show: true,
    //
    //     children: [
    //         {
    //             path: "/LeafletDemo",
    //             name: "卫星地图Demo",
    //             component: PageFour
    //         },
    //         {
    //             path: "/LeafletDemo2",
    //             name: "路网地图Demo",
    //             component: Page5
    //         },
    //     ]
    // },
    // {
    //     path: '/update',
    //     component: BookUpdate,
    //     show: false
    // },

]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router
